#!/usr/local/bin/perl
use LWP::Simple;
use HTML::Parse;
use HTML::Element;
use URI::URL;
 
$html        = get $ARGV[0];
$parsed_html = HTML::Parse::parse_html($html);
 
for (@{ $parsed_html->extract_links( ) }) {
  $link=$_->[0];
  $url      = new URI::URL $link;
  $full_url = $url->abs($ARGV[0]);
  print "$full_url\n";
}
